#ifndef MISSILE_H
#define MISSILE_H
#include <SFML\Graphics.hpp>
#include <SFML\Window.hpp>
#include "..\GamePlay\general.h"
#include "..\GamePlay\map.h"
#include <string>
class Missile
{
    public:
    Missile();
    ~Missile();
    Missile(int explosiona, std::string image, int degat);
    void SetCaractere(int explosion, int degat, std::string image);
    void Deplacer(sf::Vector2f vent, Terrain *terre, Game *jeu, std::vector<sf::Sprite> unite);
    void Afficher(sf::RenderWindow *app);
    sf::Vector2f GetPosition();
    void SetFlip(bool flip);
    void tirer(float puissance, float angle, sf::Vector2f position, sf::Vector2f vent, bool flip);
    Missile& operator=(const Missile &missile2);

    private:
    sf::Texture *m_image, *m_explimage;
    sf::Sprite explosion[16], m_munition;
    sf::Vector2f m_position, m_deplacement, positionexplode;
    sf::SoundBuffer m_bufferexplosion;
    sf::Sound m_soundexplosion;
    int m_degat;
    int m_explosion;
    int anim;
    int m_t;
    float time;
    sf::Clock clock;
    bool enTire, finTire;
};

#endif // MISSILE_H
